package com.sysmanage.permissions.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sysmanage.framework.dao.hspring.DAOInterface;
import com.sysmanage.framework.service.BaseService;
import com.sysmanage.permissions.dao.CompanyDao;
import com.sysmanage.permissions.dao.DepartmentDao;
import com.sysmanage.permissions.model.Company;
import com.sysmanage.permissions.model.Department;
import com.sysmanage.permissions.model.Role;
import com.sysmanage.permissions.service.IDepartmentService;

@Service
@Transactional
public class DepartmentService extends BaseService<Department> implements IDepartmentService {
	@Autowired
	private DepartmentDao departmentDao;
	
	public List<Department> getAll() {
		return departmentDao.getAll();
	}

	@Override
	protected DAOInterface<Department> getDAO() {
		return departmentDao;
	}

	
	public List<Map<String,Object>> getTree(String id) {
		return this.departmentDao.getTree(id);
	}
}
